<script type="text/javascript" src="animal.js"></script> 
<script type="text/javascript" src="cat.js"></script> 

<script>
    var a = new cat();
    document.write(a.eat());
</script>